/*
 * @Author: yangzonglong
 * @Date: 2021-03-01 13:18:46
 * @version: v1.0.0
 * @Descripttion:
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-08-04 16:50:44
 * @Auditor:
 */
import React from 'react';
import { FormItemProps } from 'antd/lib/form';
import useQueryControlWrap from '../../hooks/useQueryControlWrap';
import { CanvasItemProps } from '../../interface';
export interface DividItemProps extends CanvasItemProps {
  formItemProps?: FormItemProps;
}
const defaultStyle = { padding: '8px', width: '100%', background: '#fff' };
const lineStyle = { height: '1px', background: '#E4E7ED' };

const App = (props: DividItemProps) => {
  const { formItemProps, domComplete, ...canvasProps } = props;
  useQueryControlWrap(canvasProps.id, '', domComplete);

  return (
    <div {...canvasProps} {...formItemProps} style={defaultStyle}>
      <div style={{ ...lineStyle, ...formItemProps?.style }}></div>
    </div>
  );
};

export default App;
